﻿#Set cmake version >= 3.0
cmake_minimum_required(VERSION 3.0)


#set project name = "qt_vtk_modle"
project(QtVtkModle)



# set qt lib
#set(QT_PACKAGE_NAME Qt6 CACHE STRING "Set Qt package name, i.e. Qt5 or Qt6.")
find_package(Qt6 COMPONENTS Widgets Core Gui Qml Quick REQUIRED)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)


#add sub dir ...
add_subdirectory(MainWindow)
add_subdirectory(icon)


#set mian source dir = MAIN_DIR_SRC
aux_source_directory(. MAIN_DIR_SRC)
add_executable(QtVtkModle ${MAIN_DIR_SRC}) # set .exe name = qt_vtk_modle, base on MAIN_DIR_SRC 


#target link lib ...
target_link_libraries(${PROJECT_NAME}  Qt6::Widgets Qt6::Core Qt6::Gui)
target_link_libraries(${PROJECT_NAME}  mianWindow)


#添加vtk 库
find_package(VTK REQUIRED)
include_directories(${VTK_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME}  ${VTK_LIBRARIES})        
# 配置VTK Vulkan支持
target_compile_definitions(${PROJECT_NAME} PRIVATE
    VTK_ENABLE_VULKAN
)


#添加vulkan库
find_package(Vulkan REQUIRED)
include_directories(${VULKAN_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${VULKAN_LIBRARIES})


#添加 msmpi库
#find_package(MPI REQUIRED)
#include_directories(${MPI_INCLUDE_DIRS})
#target_link_libraries(${PROJECT_NAME}  ${MPI_LIBRARIES})


